RPRODUCE: CLONE / REPLICA vs. 1.1 (c) Jim Groeneveld, 7/ 1-93. Transfer complete directory branches from one PC serially to another. Using the programs below it is easy to make a copy of a harddisk to another one via a user specified serial port with a speed of maximally 115200 bps. One may also make a copy of only a part of the directory structure (a branch) on the first PC to another arbitrary branch (or logical drive) on the second one. Optionally one may give a (limiting) file specification (default *.*). Files: RPRODUCE DOC 10749 1-07-93 1:10a Nederlandse documentatie file RPRODUCE TXT 10124 1-07-93 1:10a This documentation file (English) RPRODUCE HST 3408 1-07-93 1:10a History (English) CLONE BAT 15992 1-07-93 1:10a Batch file sends a branch (whole disk) CLONE B2C 18257 1-07-93 1:10a Prepared version for BAT2EXEC compiler CLONE C0M 24329 1-07-93 1:10a Compiled version of CLONE.B2C CLONE EXE * 9803 1-07-93 1:10a LZEXE compressed version of CLONE.COM REPLICA BAT 13896 1-07-93 1:10a Batch file receives branch (whole disk) REPLICA B2C 17192 1-07-93 1:10a Prepared version for BAT2EXEC compiler REPLICA C0M 23201 1-07-93 1:10a Compiled version of REPLICA.B2C REPLICA EXE * 9451 1-07-93 1:10a LZEXE compressed version of REPLICA.COM BAT2EXEC BUG 5367 1-08-93 1:37p Bugs and other differences w/ BAT2EXEC SLASH-IF FOR 6446 12-21-92 11:16a Undocumented DOS handling of a slash COMPILE DOS 10283 12-21-92 9:28a Preparing a .BAT file for compiling ZIP COM *# 8779 1-15-92 11:45p Communications program, max. 11500 baud ZIP DOC # 32546 1-15-92 11:43p Documentation of ZIP (vs. 1.51) ZIPCFG COM # 2386 1-14-92 7:00p Configuration program for ZIP ZIPDUP COM # 1929 8-13-91 11:43a (part of ZIP, see ZIP.DOC) DISK COM *# 5632 8-05-86 8:43p Makes file listing of disk DISK DOC # 11136 8-05-86 8:45p Documentation of DISK GET&PUT& ZIP 908 5-20-92 1:00a Other related .BAT files (see below) * = absolutely necessary # = not included in this package, but available elsewhere as PD or SW package (CLONE.COM and REPLICA.COM have been renamed to CLONE.C0M and REPLICA.C0M respectively in order to let DOS start the corresponding .EXE files.) Furthermore SUBST.EXE or SUBST.COM of the concerning DOS version is necessary, as well as FIND.EXE or FIND.COM. Other (related, but not necessary) files: (in included package GET&PUT&.ZIP) GET BAT 244 5-20-92 1:00a Receives one or more files/wildcards /lists with SERVER on the other end PUT BAT 242 5-20-92 1:00a Sends one or more files/wildcards/lists SERVER BAT 35 5-20-92 1:00a Transfers one or more files/wildcards (/lists) RECEIVE1 BAT 37 5-20-92 1:00a Receives one file/wildcard/list PORTFIND COM # 4833 9-08-88 8:40a Shows the LPT and COM ports PORTFIND DOC # 7369 9-07-88 10:11a Documentation of PORTFIND If one wishes to copy a harddisk completely or partially to another PC this may be done using the programs listed above and a null-modem cable between the two respective RS-232 ports (pin 2 --> 3, pin 3 --> 2 and pin 7 --> 7). Using the program PORTFIND one may find the available COM ports. With ZIPCFG one may choose the correct COM port and the desired speed (bps) for the program ZIP (also as ZIP parameters). In interactive mode ZIP can check the connection firstly: start ZIP on either end, put one end in server mode (V) and request a directory from the other end of the first one (D>*.*) (see also ZIP.DOC) and watch whether the communication works. One has to make sure that the target disk has been formatted and the DOS system is present. It is not necessary that COMMAND.COM is available on the (hard)disk, but it works more quickly then COMMAND.COM on the working (boot) diskette. It is handy to run the programs from (two equal) floppies in both PC's, but that is not necessary; they may initially be put on the harddisks. They should rather be available in the current subdirectory on the current drive (A:\). Otherwise they should be found (run) via the current path set. Furthermore it is necessary that both PC's have been started with a CONFIG.SYS file in which in any case the line LASTDRIVE=Z is included. Drive Z: is being substituted temporarily. Only directory branches from/to logical drives (A:, B:, C:, D:, E:) can be transferred. SUBSTituted drives (F:..Z:) can not be specified, instead specify the corresponding substituted subdirectory at the logical drive. The contents of network drives can not be transferred because of program-technical reasons (no SUBST (and JOIN) possible with/on network drives) (see below for alternative). When transferring a complete harddisk (from C:\ at one to C:\ at another) the COMMAND.COM on the source disk would overwrite the same file on the target disk. This may not occur (unless identical), because the COMSPEC variable points to it and it should be present during the transfer because it is being loaded more than once. One could make COMMAND.COM write-protected. Of course write- protected will not be overwritten. Another solution is to use the /N parameter on the sending end causing existing target files not to be overwritten. N.B. Hidden and system files implicitely can not be transferred by ZIP. If during the transfer of many files (a whole disk) the process is being aborted by whatever cause, one may restart it and additionally specify the option '/N' in order not to overwrite existing files. The reproduction process then runs automatically from the point where it was interrupted. Syntax for sending: Enter: "CLONE ®drive¯®path¯ [®filespec¯] [options]" of subdirectory to transfer, including all subdirectories below (branches), with ®drive¯ = logical (not substituted) drive A..Y (not Z:), and ®path¯ = complete pathname, without trailing \, unless root, and [®filespec¯]= optional file specification, wildcard (default *.*), and [options] = one or more of optional parameters below: .s : skip initial test for temporary scratch files .d : delete specified files after successful transfer ( /1³/2³/3³/4 : COM port number ( /P : prompt for each file see also ( /N : no overwrite (default overwrite) ZIP.DOC ( /E : send only already existing files (useless in this case) ( /T : overwrite only older files, not newer ones ( /Bbaudrate : sets baudrate Example: "CLONE C:\" or "CLONE D:\WORK\TEXTS *.TXT /2 .S /t .d". Syntax for receiving: Enter: "REPLICA ®drive¯®path¯ [options]" of receiving subdirectory, with ®drive¯ = logical (not substituted) drive A..Y (not Z:), and ®path¯ = complete pathname, without trailing \, unless root, and [options] = one or more of optional parameters below: .s : skip initial test for temporary scratch files .x : skip check for existing files in target directories see also ( /1³/2³/3³/4 : COM port number ZIP.DOC ( /Bbaudrate : sets baudrate Example: "REPLICA C:\" or "REPLICA D:\WORK\TEXTS /2 .X". Help is being given by only entering: CLONE, resp. REPLICA, eventually followed by ?, /?, -?, /h or /H. The drives and subdirectories from which one departs (the specified stem of the underlying branches of the tree, the top directory) may be different on both sides, for example "CLONE D:\MAIN\BIN" and "REPLICA C:\BIN". Furthermore at least with DOS 3.3 it has appeared that these path specifications do not need to be absolute (drive:\full\path), but may be relative as well (SUBST uses and accepts this), for instance "CLONE ." (current directory) and "REPLICA sub" (directory SUB just below current directory) or "CLONE ..\sub" and "REPLICA \" or "CLONE \sub" and "REPLICA sub1\sub2", etc. This is not guaranteed to work with all DOS versions though. Attention! Because of a bug in the batch compiler BAT2EXEC it may be possible that CLONE and/or REPLICA lock up and try to send output to the printer port(!). In that case do not use the compiled programs (.EXE, .COM), but only the batch (.BAT) files, by removing the .EXE and .COM files (see further BAT2EXEC.BUG). WARNING: Avoid the use of path names within the supplied branch and file specifications having %-characters in them. These are being written literally into auxiliary files and the %-characters including their successive characters may be interpreted as batch file or environment variables. The results will be unpredictable, but certainly erroneous. Transferring networkdrives: copy them firstly to/from e.g. C:\path using XCOPY before (or after) the transfer or create a compressed "disk" (or part of it) with PKZIP and transfer the resulting .ZIP file as one file using PUT and RECEIVE1 and PKUNZIP it at the target. (Requires much free disk space!) (PKZIP-command: pkzip -upr -whs zipfile.ZIP d:\sourcepath\*.* PKUNZIP-command: pkunzip -o -d -JHSR zipfile.ZIP d:\targetpath). System requirements: IBM-PC (88/86/x86) or compatible (MS)DOS 2.x or above At least sufficient memory to load successive copies of COMMAND.COM (batch) or nested copies of CLONE or REPLICA (compiled) and ZIP and other additional temporary scratch batch files. It seems that using the .BAT files 128kb would be sufficient, while using the .COM or .EXE files 256kb is needed. Centrum voor Medische Informatica TNO | | |\/| TNO Center for Medical Informatics | GROENEVELD@CMI.TNO.NL | \_/ | | | ( CMI-TNO ) | Y. Groeneveld | GROENEVELD@CMIHP1.UUCP | Jim Groeneveld P.O.Box 124 | Wassenaarseweg 56 | GROENEVELD@TNO.NL | Schoolweg 14 2300 AC Leiden | 2333 AL Leiden | ...@HDETNO51.BITNET | 8071 BC Nunspeet Nederland. | (+31|0)71-181810 | Fax (+31|0)71-176382 | 03412-60413